package com.slipper.sfts.stock.front;

import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

import com.slipper.common.bo.Result;
import com.slipper.common.util.ResultUtil;
import com.slipper.sfts.api.stock.bo.StockPositionBO;
import com.slipper.sfts.api.stock.service.IStockPositionSv;
import com.slipper.sfts.stock.service.StockPositionService;

import java.util.List;

@RestController
public class StockPositionSv implements IStockPositionSv {
    @Resource
    private StockPositionService stockPositionService;
    
    @Override
    public Result<StockPositionBO> queryBy(String id) {
        return ResultUtil.successResult(stockPositionService.queryBy(id));
    }

    @Override
    public Result<List<StockPositionBO>> queryList(StockPositionBO bo) {
        return ResultUtil.successResult(stockPositionService.queryList(bo));
    }
    
    @Override
    public Result<List<StockPositionBO>> queryPage(StockPositionBO bo) {
        return ResultUtil.successResult(stockPositionService.queryPage(bo));
    }
    
    @Override
    public Result<?> save(StockPositionBO bo) {
        return ResultUtil.saveResult(stockPositionService.save(bo), bo);
    }
    
    @Override
    public Result<?> delete(StockPositionBO bo) {
        return ResultUtil.deleteResult(stockPositionService.delete(bo));
    }
}
